package com.zyc.demo.v.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.zyc.demo.v.mapper.CommonMapper;
import com.zyc.demo.v.service.BasisService;
import com.zyc.demo.v.service.CommonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class CommonServiceImpl extends BasisService implements CommonService {

    @Autowired
    CommonMapper commonMapper;


    @Override
    public Object page(int pageNum, int pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        List<Map<String, Object>> test = commonMapper.test();
        PageInfo<Map<String, Object>> page = new PageInfo<>(test);
        return page;
    }
}
